import 'package:hi_net/hi_net.dart';
import 'package:hi_net/request/h_base_request.dart';
import 'package:net/http/request/ranking_request.dart';
import 'package:net/model/rank_mo.dart';
import 'package:hi_base/log.dart';

class RankingDao {
  static get(String sort, {int pageIndex = 1, pageSize = 10}) async {
    RankingRequest request = RankingRequest();
    request
        .add('sort', sort)
        .add('pageIndex', pageIndex)
        .add('pageSize', pageSize);
    var result = await HiNet.getInstance().fire(request);
    // hyLog(result, StackTrace.current);
    return RankingMo.fromJson(result['data']);
  }
}
